package com.itheima.d3_transform_stream;

import java.io.*;

public class OutStreamWriterTest2 {
    public static void main(String[] args) {
        try (
                OutputStream os = new FileOutputStream("C:\\Users\\dell\\IdeaProjects\\file-io-app\\io-app2\\src\\itheima07out.txt");
                Writer osw = new OutputStreamWriter(os,"GBK");
                BufferedWriter bw=new BufferedWriter(osw);
        ) {
            bw.write('a');
            bw.write('b');
            bw.write('c');
            bw.newLine();
            bw.write("我是中国人");
        }catch (Exception e){
            e.printStackTrace();
        }

    }
}
